package cn.wubo.moredb.controller;

import cn.wubo.moredb.db1.service.Db1OneTableService;
import cn.wubo.moredb.db2.service.Db2OneTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DbController {

    @Autowired
    Db1OneTableService db1OneTableService;

    @Autowired
    Db2OneTableService db2OneTableService;

    @RequestMapping(value = "/db1/all")
    public Object db1(){
        return db1OneTableService.findAll();
    }

    @RequestMapping(value = "/db2/all")
    public Object db2(){
        return db2OneTableService.findAll();
    }


}
